package com.windbell.rest.log

import com.uniquesoft.gwt.server.service.common.IRequestInfoAcceptor
import org.springframework.stereotype.Component
import edu.fudan.langlab.uidl.domain.app.server.logging.RequestInfoAcceptor
import edu.fudan.langlab.domain.log.SystemRequestLog

interface RequestInfoAcceptorFactory {
    def IRequestInfoAcceptor<SystemRequestLog> createRequestLogAcceptor()
}

@Component
class DefaultRequestInfoAcceptoFactory implements RequestInfoAcceptorFactory{
    override createRequestLogAcceptor() {
        return new RequestInfoAcceptor();
    }
}

//@Component
//@Profile("prod")
//class RemoteRequestInfoAcceptoFactory implements RequestInfoAcceptorFactory{
//    override createRequestLogAcceptor() {
//        return new RequestInfoAcceptor();
//    }
//}
